package system.service.sys.impl;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import system.entity.SysLoginFailCounter;
import system.mapper.SysLoginFailCounterMapper;
import system.service.sys.SysLoginFailCounterService;

import java.util.Date;
import java.util.List;

@Service
public class SysLoginFailCounterServiceImpl implements SysLoginFailCounterService {
    @Autowired
    @Getter
    private SysLoginFailCounterMapper mapper;

    @Override
    public List<SysLoginFailCounter> listNoExpired(String username, Date expireTime) {
        return mapper.listNoExpired(username, expireTime);
    }

    @Override
    public int listNoExpiredSize(String username, Date expireTime) {
        return mapper.listNoExpiredSize(username, expireTime);
    }

    @Override
    public Integer update(SysLoginFailCounter param) {
        return mapper.updateBody(param);
    }
}